class Mind::FriendshipsController < Mind::MindController

  def hint_redirect
    if request.xhr?
      friendship = Friendship.find(params[:id])
      friendship.remove_hint(params[:hint])
      friendship.save
      render :update do |page|
        case params[:hint]
          when 'page'
            page.redirect_to fp_url(:friend=>friendship.dneirf.login, :page=>1)
          when 'album'
            page.redirect_to fp_url(:friend=>friendship.dneirf.login, :page=>1)
          when 'show'
            page.redirect_to :controller => 'mind/friends', :action => 'show', :id => friendship.dneirf
          else
            page.redirect_to '/'
        end
      end
    end
  end

end